package org.coderjonny.feign;

import org.coderjonny.bean.User;
import org.coderjonny.dto.Request;
import org.coderjonny.dto.Result;
import org.coderjonny.dto.user.UserId;
import org.coderjonny.service.fallback.service.UserServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "server-user",fallback = UserServiceFallBack.class)
public interface UserService {
    @PostMapping("/user/getByUserId")
    Result<User> getByUserId(@RequestBody Request<UserId> request);
}
